<!DOCTYPE html>
<html lang="en">
   <head>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="../css/reset.css" />
        <link rel="stylesheet" type="text/css" href="../css/style.css" />
        <link rel="stylesheet" type="text/css" href="../css/header.css" />
        <link rel="stylesheet" type="text/css" href="../css/collection.css" />

        <script type="text/javascript" src="../js/flexible.debug.js"></script>

        <script type="text/javascript" src="../js/flexible_css.debug.js"></script>

    </head>
    <body>
        <header class="header">
            <span class="span"><img src="../img/fanhui.png" class="return" /></span>
            <span class="span">我的收藏</span>
            <span class="span"></span>
        </header> 

        <main>

            <figure>
                <!--<dl>
                    <dt><img src="../img/shoucang1.png" height="347" width="350" alt="" /></dt>
                    <dd class='one'>
                        <h3>2015夏装  波西米亚民族风碎花吊带连衣裙</h3>
                        <p>￥189</p>
                    </dd>
                    <dd class='two'>
                        <button>删除</button>
                    </dd>
                </dl>



                <dl>
                    <dt><img src="../img/shoucang2.png" height="347" width="350" alt="" /></dt>
                    <dd class='one'>
                        <h3>拼接网纱礼服裙大摆蓬蓬气质中长连衣裙</h3>
                        <p>￥238</p>
                    </dd>
                    <dd class='two'>
                        <button>删除</button>
                    </dd>
                </dl>


                <dl>
                    <dt><img src="../img/shoucang3.png" height="347" width="350" alt="" /></dt>
                    <dd class='one'>
                        <h3>黑白条纹修身T袖字母背带裙  休闲套装裙</h3>
                        <p>￥329</p>
                    </dd>
                    <dd class='two'>
                        <button>删除</button>
                    </dd>
                </dl>-->

            </figure>

        </main>
        <script type="text/javascript" src="../js/jquery-2.1.4.min.js"></script>
        <script src="../js/artTemplate.js"></script>
        
       <script>
       		$(function(){
       			
       			$('figure').on('click','dl',function(){
       				$('dl .two ').hide();
				$('dl .two ').eq($(this).index()).show();
				
				$('.two button').click(function(){
					$(this).parent().parent().remove();
				})
       			});
       			
       		
       			
       		})
       </script>
        
        
        <script type="text/javascript">
            $('.return').click(function(){
                location.href="mine.html";
            });
            
            
            
            
        </script>
        
        
        
        <script type="text/html" id="tr-temp"> 
		 	     
		    {{each list as v}}
		   		<dl>
                    <dt><img src="{{v.img}}"/></dt>
                    <dd class='one'>
                        <h3>{{v.biaoti}}</h3>
                        <p>{{v.jiage}}</p>
                    </dd>
                    <dd class='two'>
                        <button>{{v.shanchu}}</button>
                    </dd>
                </dl>
             
           {{/each}}
		</script>
		
		
        <script>
		
			 $(function(){
            
            
            var _url = '../json/collection.json';
            $.get(_url,function(res){
				console.log(res)
				var str = '';
				 var str = template("tr-temp", {list:res});	 
				 console.log(str);
				$('figure').html(str);
				
			});

            
         })
		</script>
		
		
		
		
		 <script type="text/html" id="temp"> 
		 	     
		    {{each list as v}}
		   		<dl>
                    <dt><img src="{{v.img1}}"/></dt>
                    <dd class='one'>
                        <h3>{{v.biaoti1}}</h3>
                        <p>{{v.jiage1}}</p>
                    </dd>
                    <dd class='two'>
                        <button>{{v.shanchu1}}</button>
                    </dd>
                </dl>
             
           {{/each}}
		</script>
		
		
        <script>
		
			 $(function(){
            
            
            var _url = '../json/collection.json';
            $.get(_url,function(res){
				console.log(res)
				var str = '';
				 var str = template("temp", {list:res});	 
				 console.log(str);
				$('figure').html(str);
				
			});

            
         })
		</script>
		
		
		
		
		
		 
		
		
		
		
		
		
		
		<script type="text/html" id="temp_three"> 
		 	     
		    {{each list as v}}
		   		<dl>
                    <dt><img src="{{v.img}}"/></dt>
                    <dd class='one'>
                        <h3>{{v.biaoti}}</h3>
                        <p>{{v.jiage}}</p>
                    </dd>
                    <dd class='two'>
                        <button>{{v.shanchu}}</button>
                    </dd>
                </dl>
             
           {{/each}}
		</script>
		
		
        <script>
		
			 $(function(){
            
            
            var _url = '../json/collection.json';
            $.get(_url,function(res){
				console.log(res)
				var str = '';
				 var str = template("temp_three", {list:res});	 
				 console.log(str);
				$('figure').html(str);
				
			});

            
         })
		</script>
            

    </body>
</html>